#include <cstdio>
#include <iostream>

using namespace std; 

int p1, p2, p3; 

int ch_type(char ch)
{
	return (ch>='a' && ch<='z') ? 1 : ((ch>='0' && ch<='9') ? 2 : 3); 
}

int is_alpha(char ch)
{
	return ch>='a' && ch<='z'; 
}


int main()
{
	string s1; 
	
	//freopen("p1098_4.in", "r", stdin); 

	cin>>p1>>p2>>p3; 
	cin>>s1; 
	
	for (unsigned i=0; i<s1.size(); i++) {
		if (s1[i]!='-') {
			cout<<s1[i]; 
			continue; 
		} 
		if (i==0 || i==s1.size()-1 || s1[i-1]>=s1[i+1]) {
			cout<<s1[i]; 
			continue; 
		}
		if (ch_type(s1[i-1])!=ch_type(s1[i+1])) {
			cout<<s1[i]; 
			continue; 
		}
		
		int n = s1[i+1] - s1[i-1]; 
		char ch; 
		for (int j=1; j<n; j++) {
			ch = (p3==1 ? s1[i-1]+j : s1[i+1]-j); 
			if (p1==3) {
				ch = '*'; 
			} else if (p1==2 && is_alpha(ch)) {
				ch = ch - 'a' + 'A'; 
			} 
			for (int k=0; k<p2; k++) {
				cout<<ch; 
			}
		}
	}
	cout<<"\n"; 
	return 0; 
}



